<!DOCTYPE html>
<html>
    <head>
        <script src="vue.js"></script>
    </head>
    <body>
        <div id="app">
       <div></div>
       <div></div>
        </div>
      
        <script>
            Vue.mixin({
                created(){
                    console.log('这是通过混入的crested钩子函数');
                    var myOption = this.$options.myOption;
                    if(myOption){
                        console.log(myOption.toUpperCase());
                    }
                },
                data(){
                    return{
                    msg:'test'
                }
                }
            });

            var vm = new Vue(
                created(){
                    console.log('这是vue实例当中的crested钩子函数');
                },
                myOption:'hello vue!',
            });
        </script>
    </body>
</html>